#include "stdio.h"
const char * GetFileName( const char* path,const char* sep);
/*******************/ 
#define log_printf(ls, fn, ln, yorn, ... ) do { \
	char log[2560] = {0}; \
	_snprintf_s(log, sizeof(log), __VA_ARGS__ ); \
	fn != NULL ? fprintf(stdout, "%s %s(%s:%d)->%s", ls, fn, __FUNCTION__, ln, log)\
	: fprintf(stdout, "%s %s %s", ls, __FUNCTION__, log) ; \
	yorn == "y" ? (1==1) : (1==1) ; \
}while(0); 

#define Log_Error( ... ) log_printf("Error:", GetFileName(__FILE__, "\\"), __LINE__, "n", __VA_ARGS__ ) 

#ifndef NDEBUG 
#define Log_Debug( ... ) log_printf("Debug:", GetFileName(__FILE__, "\\"), __LINE__, "n", __VA_ARGS__ ) 
#else 
#define Log_Debug( ... ) do {} while(0); 
#endif 

#define Log_Fetal( ... ) log_printf("Fetal:", GetFileName(__FILE__, "\\"), __LINE__, "y", __VA_ARGS__ ) 

//#define log_info( ... ) log_printf("Info:", (char*)0, 0, "n", __VA_ARGS__ )
/************* log end ********/ 

